export function checkRule(response,self){
	// 判断response中是否含有data属性
	var status = "data" in response;  
	if(status){
		if (response.data.login_code == -2) {
			self.$Message.warning(response.data.login_msg);
		}
	}else{
		if (response.login_code == -2) {
			self.$Message.warning(response.login_msg);
		}else if (response.login_code == -1) {
			self.$Message.error('登录失效');
			// 跳路由
			self.$router.push({ 
				path: "/login" 
			});
		}
	} 
	return false;
}



